1. Technical Field
The present invention relates to an edge enhancement method, and more particularly to an edge enhancement method utilizing high pass filtering.
2. Related Art
Devices which utilize a scanner when reading documents can sometimes produce a low quality image. One example of a device which utilizes a scanner is a facsimile device. The image processing methods used by the facsimile device can result in a low quality image.
Image processing methods can include an analysis of neighboring pixels in a digitized image. Imagine a digitized picture of a white object resting on a black floor. Suppose that a small neighborhood of adjacent pixels in this picture are analyzed. If the gray values of the adjacent pixels do not change, then one can conclude that one is looking at a portion of the picture that is either within the object or within the dark background. However, if the gray values of the adjacent pixels do change, then one can conclude that one is looking at the edge of the object. In this way, areas with constant gray values and areas which correspond to edges can be identified. Efforts have been made to improve image processing methods.
Exemplars of recent efforts in the art include U.S. Pat. No.4,399,461 for Electronic Image Processing issued to Powell, U.S. Pat. No. 5,481,628 for Method And Apparatus For Spatially Variant Filtering issued to Ghaderi, U.S. Pat. No. 5,819,035 for Post-Filter For Removing Ringing Artifacts Of DCT Coding issued to Devaney et al., U.S. Pat. No. 5,912,744 for Image Forming Apparatus Having Image Processing Unit Containing A Plurality Of Filters Arranged In Parallel To Each Other issued to Nakane, U.S. Pat. No. 5,926,577 for Video Signal Processing Apparatus With Noise Reduction And Edge Enhancement issued to Kasahara et al., and U.S. Pat. No. 5,974,193 for Relating To Noise Reduction issued to Baudouin.
While these recent efforts provide advantages, I note that they fail to adequately provide an edge enhancement method by 4-directional 1-dimensional high pass filtering.
It is an object of the present invention to provide a novel and elegant edge enhancement method in which edge components are highlighted in documents.
It is a further object of the present invention to provide an improved method in which edge components are highlighted in documents having both images and text characters.
It is a further object of the present invention to provide an edge enhancement method by 4-directional 1-dimensional high pass filtering in which edge components are highlighted in documents having both image and character so as to allow more clear print of character.
To achieve these and other objects in accordance with the principles of the present invention, as embodied and broadly described, the present invention provides an edge enhancement method by 4-directional 1-dimensional high pass filtering characterized in that 4 adjacent pixels positioned at a pixel point at which the primary pixel has euclidean distance of 2 in direction of right, left, up, and down, another 4 adjacent pixels positioned at a pixel point at which the primary pixel has euclidean distance of 22 in 45xc2x0 and 135xc2x0 direction, and 9 pixels including the primary pixel are masked by a window mask, and if the maximum difference of the surround pixels which are masked is greater than a predetermined reference difference, each edge enhancement value is calculated by performing 1-dimensional high pass filtering in column, row, 45xc2x0, and 135xc2x0 direction centered from the primary pixel using the pixel values which are masked to the window mask. If the primary pixel is greater than the average value of the pixels which are masked to the window mask, the primary pixel is substituted by the maximum edge enhancement value among the above-calculated each edge enhancement value. If the primary pixel is less than the average value of the pixels, the primary pixel is substituted by the minimum edge enhancement value.
To achieve these and other objects in accordance with the principles of the present invention, as embodied and broadly described, the present invention provides a method, comprising the steps of: arranging a primary pixel to be processed with edge enhancement in accordance with a raster scanning order, said primary pixel being selected from a plurality of pixels of an image; masking said primary pixel and eight additional pixels selected from among said plurality of pixels, said eight pixels being adjacent to said primary pixel and including a first four pixels and a second four pixels, said first four pixels being located in a right, left, up, and down direction respectively in relation to said primary pixel, said second four pixels being located in diagonal directions corresponding to 45xc2x0, 135xc2x0, 225xc2x0, and 315xc2x0 respectively in relation to said primary pixel; calculating a difference between a maximum value and a minimum value of said eight pixels; determining when said calculated difference is greater than a predetermined reference difference; when said calculated difference is less than said predetermined reference difference, outputting said primary pixel not modified; when said calculated difference is greater than said predetermined reference difference, performing the substeps comprising of: determining four enhancement values by performing a first filtering operation in a column direction, a second filtering operation in a row direction, a third filtering operation in a 45xc2x0 direction, and a fourth filtering operation in a 135xc2x0 direction, each one of said four filtering operations resulting in one of said four enhancement values, each of said four filtering operations centering on said primary pixel; said first filtering operation in said column direction including said primary pixel and said two pixels located in the up and down direction in relation to said primary pixel, said second filtering operation in said row direction including said primary pixel and said two pixels located in the right and left direction in relation to said primary pixel, said third filtering operation in said 45xc2x0 direction including said primary pixel and said two pixels located in the 45xc2x0 and 225xc2x0 direction in relation to said primary pixel, said fourth filtering operation in said 135xc2x0 direction including said primary pixel and said two pixels positioned in the 135xc2x0 and 315xc2x0 direction in relation to said primary pixel; determining when value of said primary pixel is greater than average value of said four enhancement values; when said primary pixel value is greater than said average value, modifying said primary pixel by replacing said primary pixel value with largest value of said four enhancement values; when said primary pixel value is less than said average value, modifying said primary pixel by replacing said primary pixel value with smallest value of said four enhancement values; and outputting said primary pixel modified.
To achieve these and other objects in accordance with the principles of the present invention, as embodied and broadly described, the present invention provides a method, comprising the steps of: arranging a primary pixel to be processed with edge enhancement in accordance with a raster scanning order, said primary pixel being selected from a plurality of pixels of an image; selecting said primary pixel and eight additional pixels from among said plurality of pixels, said eight pixels being adjacent to said primary pixel and including a first four pixels and a second four pixels, said first four pixels being located in a right, left, up, and down direction respectively in relation to said primary pixel, said second four pixels being located in diagonal directions corresponding to 45xc2x0, 135xc2x0, 225xc2x0, and 315xc2x0 respectively in relation to said primary pixel; calculating a difference between a maximum gray level value and a minimum gray level value of said eight pixels; determining when said calculated difference is greater than a predetermined reference difference; when said calculated difference is less than said predetermined reference difference, outputting said primary pixel not modified; when said calculated difference is greater than said predetermined reference difference, performing the substeps comprising of: determining four enhancement values by performing a first filtering operation in a column direction, a second filtering operation in a row direction, a third filtering operation in a 45xc2x0 direction, and a fourth filtering operation in a 135xc2x0 direction, each one of said four filtering operations resulting in one of said four enhancement values, each of said four filtering operations centering on said primary pixel; determining when gray level value of said primary pixel is greater than average gray level value of said four enhancement values; when said primary pixel gray level value is greater than said average gray level value, modifying said primary pixel by replacing said primary pixel gray level value with largest gray level value of said four enhancement values; when said primary pixel gray level value is less than said average gray level value, modifying said primary pixel by replacing said primary pixel gray level value with smallest gray level value of said four enhancement values; and outputting said primary pixel modified.
To achieve these and other objects in accordance with the principles of the present invention, as embodied and broadly described, the present invention provides a method, comprising the steps of: selecting a primary pixel to be processed with edge enhancement in accordance with a raster scanning order, said primary pixel being selected from a plurality of pixels of an image; masking said primary pixel and eight additional pixels selected from among said plurality of pixels, said eight pixels being adjacent to said primary pixel and including a first four pixels and a second four pixels, said first four pixels being located in a right, left, up, and down direction respectively in relation to said primary pixel, said second four pixels being located in diagonal directions corresponding to 45xc2x0, 135xc2x0, 225xc2x0, and 315xc2x0 respectively in relation to said primary pixel; calculating a difference between a maximum value and a minimum value of said eight pixels; determining when said calculated difference is greater than a predetermined reference difference; when said calculated difference is less than said predetermined reference difference, outputting said primary pixel not modified; when said calculated difference is greater than said predetermined reference difference, performing the substeps comprising of: determining four enhancement values by performing filtering operations centering on said primary pixel; determining when value of said primary pixel is greater than average value of said four enhancement values; when said primary pixel value is greater than said average value, modifying said primary pixel by replacing said primary pixel value with largest value of said four enhancement values; when said primary pixel value is less than said average value, modifying said primary pixel by replacing said primary pixel value with smallest value of said four enhancement values; and outputting said primary pixel modified.